/*
 * CarlosMidlet.java
 *
 * Created on 29 de Junho de 2007, 10:30
 */

package Carlos;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 *
 * @author  JAKE
 * @version
 */
public class CarlosMidlet extends MIDlet {
    
    
    CarlosCanvas cCanvas;
    
    public void startApp() {
        initialize();
    }
    
    public void pauseApp() {
    }
    
    public void destroyApp(boolean unconditional) {
    }
    
    public void initialize(){
        CarlosListener list=new CarlosListener();
        
        cCanvas =new CarlosCanvas(Display.getDisplay(this));
        
        cCanvas.addCommand(list.getMyGoCommand());
        cCanvas.addCommand(list.getMyExitCommand());
        cCanvas.setCommandListener(list);
        CarlosThread t=new CarlosThread(cCanvas);
        
        t.start();
        
    }
}
